<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">

<head th:include="css :: css">
</head>
<link href="/js/jquery.icheck/skins/square/blue.css" rel="stylesheet">
<link href="/css/bootstrap-toggle.min.css" rel="stylesheet">
<link href="/js/jquery.icheck/skins/square/blue.css" rel="stylesheet">
<link href="/css/chosen.css" rel="stylesheet">
<body style="opacity: 1">
<div style="padding-top: 0">
    <div class="container-fluid">
        <div class="cl-mcont">
            <div class="row">
                <div class="col-md-12" style="padding:0">
                    <div class="block-flat">
                        <form class="form-horizontal group-border-dashed" id="buyCode">
                            <input type="hidden" id="productTypes" name="productTypes">
                            <input type="hidden" id="statusArray" name="statusArray">
                            <div class="form-group">
                                <div class="input-group">
                                    <input type="text" class="form-control" name="userAccount" id="userAccount"
                                           placeholder="会员名称/编号"/>
                                </div>
                                <div class="input-group">
                                    <input type="text" class="form-control" id="cardNumber" name="cardNumber"
                                           placeholder="卡号"/>
                                </div>
                                <div class="input-group">
                                    <input type="text" class="form-control" id="batch" name="batchId"
                                           placeholder="批次号"/>
                                </div>
                                <div class="input-group">
                                    <input type="text" class="form-control" id="orderId" name="orderId"
                                           placeholder="订单号"/>
                                </div>
                                <div class="input-group">
                                    <input type="text" class="form-control" id="teeEggOrderNo" name="teeEggOrderNo"
                                           placeholder="茶蛋订单号"/>
                                </div>
                                <div class="input-group">
                                    <input type="text" class="form-control" id="face" style="width: 80px"
                                           placeholder="面值"
                                           name="face"/>
                                </div>
                                <div class="input-group">
                                    <input type="text" class="form-control" name="startTime"
                                           id="buyStartTime" style="display: inline-block; width: 145px;">
                                    <input type="text" class="form-control" name="endTime"
                                           id="buyEndTime" style="display: inline-block; width: 145px;">
                                </div>
                                <div class="input-group">
                                    <select class="form-control" id="timeType" name="timeType">
                                        <option value="0">入库时间</option>
                                        <option value="1">处理时间</option>
                                    </select>
                                </div>
                                <div class="input-group">
                                    <select class="form-control chosen-select" id="status" name="statusStr"
                                            multiple="multiple">
                                        <option value="" selected>全部状态</option>
                                        <option value="0">在售</option>
                                        <option value="1">已售</option>
                                        <option value="2">停售</option>
                                        <option value="3">可售</option>
                                        <option value="4">未预判面值</option>
                                        <option value="5">预判面值不符</option>
                                        <option value="7">等待慢速试充</option>
                                        <option value="8">慢速试充</option>
                                        <option value="9">待结算</option>
                                        <option value="10">纠纷中</option>
                                        <option value="50">补结算</option>
                                    </select>
                                </div>
                                <div class="input-group">
                                    <select class="selectpicker" title="运营商"
                                            id="operator"
                                            name="productType"
                                            data-live-search="true">
                                    </select>
                                </div>
                                <div class="input-group">
                                    <select class="form-control" id="cardSource" name="cardSource">
                                        <option value="">订单来源</option>
                                        <option value="0">原公众号或WEB</option>
                                        <option value="1">原接口</option>
                                        <option value="3">公众号</option>
                                        <option value="4">WEB</option>
                                    </select>
                                </div>
                                <div class="input-group">
                                    <select class="form-control" id="transferMark" name="transferMark">
                                        <option value="">人工结算</option>
                                        <option value="1">已结算</option>
                                        <option value="2">未结算</option>
                                    </select>
                                </div>

                                <div class="input-group">
                                    <input type="text" class="form-control" id="remark_query" style="width: 80px"
                                           placeholder="备注"
                                           name="remark"/>
                                </div>
                                <div class="input-group">
                                    <button class="btn btn-primary" type="button" id="search"><i
                                            class="fa fa-search"></i>查询
                                    </button>
                                </div>
                            </div>
                            <div class="form-group">
                                <div class="input-group">
                                    <button class="btn btn-info" type="button" onclick="failFun(1)"><i
                                            class="fa fa-times"></i>批次失败
                                    </button>
                                </div>
                                <div class="input-group">
                                    <button class="btn btn-danger" type="button" onclick="failFun(2)"><i
                                            class="fa fa-times"></i>卡号失败
                                    </button>
                                </div>
                                <div class="input-group">
                                    <button class="btn btn-warning" type="button" onclick="failFun(3)"><i
                                            class="fa fa-recycle"></i>批次再次提交(通用)
                                    </button>
                                </div>
                                <div class="input-group">
                                    <button class="btn btn-success" type="button" id="synchronous"><i
                                            class="fa fa-refresh"></i>同步
                                    </button>
                                </div>
                                <div class="input-group">
                                     <span id="changeTelecomJudge">
                                        <input type="checkbox" data-onstyle="danger" data-offstyle="warning"
                                               name="include2" id="include2"
                                               data-on="直接走试充" data-off="异常n次走试充" checked data-toggle="toggle"
                                               data-size="mini"/>
                                     </span>
                                </div>
                                <div class="input-group">
                                    <button class="btn btn-warning btn-warning" type="button"
                                            id="autoAsyn"><i class="fa fa-unlock-alt"></i>手动异步
                                    </button>
                                </div>

                                <div class="input-group">
                                    <button class="btn btn-success" type="button" onclick="equitySetSuccess()">
                                        <i class="fa fa-check-circle"></i>置成功(权益)
                                    </button>
                                </div>
                                <div class="input-group">
                                    <button class="btn btn-danger" type="button" onclick="equityToFail()"><i
                                            class="fa fa-times"></i>置失败(权益)
                                    </button>
                                </div>
                                <div class="input-group">
                                    <button class="btn btn-info" type="button" onclick="manualClearing()"><i
                                            class="glyphicon glyphicon-usd"></i>手动补结算(权益)
                                    </button>
                                </div>
                                <div class="input-group">
                                    <button class="btn btn-success" type="button" id="addRemark"
                                            onclick="equitySetRemark('userRemark')">
                                        <i class="fa fa-pencil"></i>会员备注
                                    </button>
                                </div>
                                <div class="input-group">
                                    <button class="btn btn-success" type="button" id="adminRemark"
                                            onclick="equitySetRemark('adminRemark')">
                                        <i class="fa fa-pencil"></i>运营备注
                                    </button>
                                </div>
                                <div class="input-group" id="export_Role">
                                    <button class="btn btn-default" type="button" id="export"><i
                                            class="fa fa-download"></i> 导出
                                    </button>
                                </div>
                                <div class="input-group">
                                    <button class="btn btn-danger" type="button"
                                            onclick="commonHiddenColumn('dataTable', 3)"></i>隐
                                    </button>
                                </div>
                            </div>
                        </form>
                    </div>
                    <div class="block-flat">
                        <div class="content">
                            <div class="table-responsive">
                                <table class="table hover" id="dataTable">
                                </table>
                            </div>
                        </div>
                    </div>
                </div>
            </div>

        </div>
    </div>
    <div class="modal fade" id="hideModal" tabindex="-1" role="dialog" aria-labelledby="hideLabel">
        <div class="modal-dialog" role="document" style="width:1100px;">
            <div class="modal-content" style="width: 440px;margin: auto;">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span
                            aria-hidden="true">&times;</span></button>
                    <h4 class="modal-title" id="hideLabel">请选择隐藏列</h4>
                </div>
                <div class="modal-body">
                    <div id="chooseHide">

                    </div>
                </div>
                <div class="modal-footer">
                    <button type="button" class="btn btn-primary" data-dismiss="modal">确定</button>
                </div>
            </div>
        </div>
    </div>
    <div class="modal fade" id="updateUserCertificateModal" tabindex="-1"
         role="dialog"
         aria-labelledby="updateUserModalLabel">
        <div class="modal-dialog" role="document" style="width:800px;">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal"
                            aria-label="Close"><span
                            aria-hidden="true">&times;</span></button>
                    <h4 class="modal-title" id="updateUserModalLabel">置失败</h4>
                </div>
                <div class="modal-body" style="min-height:100px;">
                    <form class="form-horizontal" role="form"
                          id="updateUserCertificateForm">
                        <div class="form-group">
                            <label for="remark"
                                   class="col-sm-2 control-label">备注</label>
                            <div class="col-sm-8">
                                <select class="form-control" id="remark">
                                    <option value="">失败原因</option>
                                    <option value="自有卡密上传重复">自有卡密上传重复</option>
                                    <option value="卡密上传重复">卡密上传重复</option>
                                    <option value="卡密类型错误">卡密类型错误</option>
                                    <option value="卡密存在质量问题">卡密存在质量问题</option>
                                    <option value="勿拍照，请上传完整截图">勿拍照，请上传完整截图</option>
                                    <option value="无卡密类型">无卡密类型</option>
                                    <option value="有效期小于5天">有效期小于5天</option>
                                    <option value="无有效期">无有效期</option>
                                    <option value="无有效期，请在订单详情里截图">无有效期，请在订单详情里截图</option>
                                    <option value="有使用地区限制，暂时不收">有使用地区限制，暂时不收</option>
                                    <option value="有使用时间限制，暂时不收">有使用时间限制，暂时不收</option>
                                    <option value="无二维码/无条形码">无二维码/无条形码</option>
                                    <option value="其他">其他</option>
                                    <option value="图片不清晰，请用手机截图">图片不清晰，请用手机截图</option>
                                    <option value="截图无法查询余额，请联系客服提供链接">截图无法查询余额，请联系客服提供链接</option>
                                    <option value="第三方平台购买，不收">第三方平台购买，不收</option>
                                    <option value="有使用门店限制，暂时不收">有使用门店限制，暂时不收</option>
                                    <option value="有效期小于7天">有效期小于7天</option>
                                    <option value="请通过肯德基代金券链接卡券类型上传对应卡券链接">请通过肯德基代金券链接卡券类型上传对应卡券链接</option>
                                </select>
                            </div>
                        </div>
                        <div class="form-group">
                            <label for="remark" class="col-sm-2 control-label"><span
                                    class="text-danger"></span>手动录入备注:</label>
                            <div class="col-sm-8" style="width: 240px">
                                <input type="text" class="form-control"
                                       id="remark_id" name="remark">
                            </div>
                        </div>
                    </form>
                </div>
                <div class="modal-footer">
                    <button type="button" class="btn btn-default"
                            data-dismiss="modal">取消
                    </button>
                    <button type="button" class="btn btn-primary"
                            onclick="equitySetFail()">确定
                    </button>
                </div>
            </div>
        </div>
    </div>
    <!--更新备注-->
    <div class="modal fade" id="myModal1" tabindex="-1" role="dialog" aria-labelledby="updateStatusLabel">
        <div class="modal-dialog" role="document" style="width:800px;">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span
                            aria-hidden="true">&times;</span></button>
                    <h4 class="modal-title" id="updateStatusLabel">更新备注</h4>
                </div>
                <div class="modal-body" style="min-height: 100px;">
                    <form class="form-horizontal" role="form" id="maintainForm">
                        <input type="hidden" id="rowId" name="id">
                        <input type="hidden" id="remarkType" name="remarkType">
                        <input type="hidden" id="remarkLimit" name="remarkLimit">
                        <div class="col-sm-6">
                            <div class="form-group">
                                <label for="remark" class="col-sm-4 control-label"><span
                                        class="text-danger"></span>备注:</label>
                                <div class="col-sm-7" style="width: 240px">
                                    <input type="text" class="form-control"
                                           id="remarks" name="remark">
                                </div>
                            </div>
                        </div>
                    </form>
                </div>
                <div class="modal-footer">
                    <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
                    <button type="button" class="btn btn-primary" id="toSaveRemark">确定</button>
                </div>
            </div>
        </div>
    </div>
    <!--手动补结算-->
    <div class="modal fade" id="myModal2" tabindex="-1" role="dialog" aria-labelledby="updateStatusLabel">
        <div class="modal-dialog" role="document" style="width:800px;">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span
                            aria-hidden="true">&times;</span></button>
                    <h4 class="modal-title" id="manualClearingSetting">手动补结算</h4>
                </div>
                <div class="modal-body" style="height: 450px;">
                    <form class="form-horizontal" role="form" id="manualClearingForm">
                        <input type="hidden" id="MC_rowId" name="id">
                        <input type="hidden" id="MC_remarkLimit" name="remarkLimit">
                        <input type="hidden" id="MC_status" name="status">
                        <div class="col-sm-6">
                            <div class="form-group">
                                <label for="remark" class="col-sm-4 control-label"><span
                                        class="text-danger"></span>会员编号:</label>
                                <div class="col-sm-7" style="width: 240px">
                                    <input type="text" class="form-control"
                                           id="MC_userAccount" name="userAccount" readonly/>
                                </div>
                            </div>
                            <div class="form-group">
                                <label for="remark" class="col-sm-4 control-label"><span
                                        class="text-danger"></span>会员名称:</label>
                                <div class="col-sm-7" style="width: 240px">
                                    <input type="text" class="form-control"
                                           id="MC_userName" name="userName" readonly/>
                                </div>
                            </div>
                            <div class="form-group">
                                <label for="remark" class="col-sm-4 control-label"><span
                                        class="text-danger"></span>批次号:</label>
                                <div class="col-sm-7" style="width: 240px">
                                    <input type="text" class="form-control"
                                           id="MC_batchId" name="batchId" readonly/>
                                </div>
                            </div>
                            <div class="form-group">
                                <label for="remark" class="col-sm-4 control-label"><span
                                        class="text-danger"></span>订单号:</label>
                                <div class="col-sm-7" style="width: 240px">
                                    <input type="text" class="form-control"
                                           id="MC_orderId" name="orderId" readonly/>
                                </div>
                            </div>
                            <div class="form-group">
                                <label for="remark" class="col-sm-4 control-label"><span
                                        class="text-danger"></span>申请类型:</label>
                                <div class="col-sm-7" style="width: 240px" id="MC_applyType">
                                    <input type="radio" value="0" name="applyType">部分加款
                                    <input type="radio" value="1" name="applyType">闲鱼失败加款
                                </div>
                            </div>
                            <div class="form-group">
                                <label for="remark" class="col-sm-4 control-label"><span
                                        class="text-danger"></span>结算金额:</label>
                                <div class="col-sm-7" style="width: 240px">
                                    <input type="text" class="form-control"
                                           id="MC_userPrice" name="userPrice" readonly/>
                                </div>
                            </div>

                            <div class="form-group">
                                <label for="remark" class="col-sm-4 control-label"><span
                                        class="text-danger"></span>加款金额:</label>
                                <div class="col-sm-7" style="width: 240px">
                                    <input type="text" class="form-control"
                                           id="MC_addUserPrice" name="addUserPrice"/>
                                </div>
                            </div>
                            <div class="form-group">
                                <label for="remark" class="col-sm-4 control-label"><span
                                        class="text-danger"></span>备注:</label>
                                <div class="col-sm-7" style="width: 240px">
                                    <input type="text" class="form-control"
                                           id="MC_remark" name="remark" maxlength="200"/>
                                </div>
                            </div>
                        </div>
                    </form>
                </div>

                <div class="modal-footer">
                    <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
                    <button type="button" class="btn btn-primary" id="toSaveUserPrice">确定</button>
                </div>
            </div>
        </div>
    </div>
    <!--更新备注：批次失败，卡号失败-->
    <div class="modal fade" id="myModal3" tabindex="-1" role="dialog" aria-labelledby="updateStatusLabel">
        <div class="modal-dialog" role="document" style="width:800px;">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span
                            aria-hidden="true">&times;</span></button>
                    <h4 class="modal-title" id="updateStatusLabel_3">更新备注</h4>
                </div>
                <div class="modal-body" style="min-height: 100px;">
                    <form class="form-horizontal" role="form" id="maintainForm_3">
                        <input type="hidden" id="batchId_3" name="batchId">
                        <input type="hidden" id="operate_3" name="operate">
                        <input type="hidden" id="id_3" name="id">
                        <input type="hidden" id="productType_3" name="productType">
                        <div class="col-sm-6">
                            <div class="form-group">
                                <label for="remark" class="col-sm-4 control-label"><span
                                        class="text-danger"></span>备注:</label>
                                <div class="col-sm-7" style="width: 240px">
                                    <input type="text" class="form-control"
                                           id="remarks_3" name="remark">
                                </div>
                            </div>
                        </div>
                    </form>
                </div>
                <div class="modal-footer">
                    <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
                    <button type="button" class="btn btn-primary" id="toSaveRemark_3">确定</button>
                </div>
            </div>
        </div>
    </div>
</div>
<div th:include="js :: js"></div>
<script type="text/javascript" th:attr="src=@{/js/jquery.form.js}"></script>
<script type="text/javascript" th:attr="src=@{/js/jquery.parser.js}"></script>
<script type="text/javascript" src="js/jquery.icheck/icheck.min.js"></script>
<script type="text/javascript" src="/js/pageJs/order/recycleCard.js?deVersion=2018080293"></script>
<script type="text/javascript" src="/js/chosen.jquery.js?deVersion=20181411231"></script>
<script>
    var orderStatus = GetQueryString("orderStatus");
    if (orderStatus != null && orderStatus != '') {
        $("#status").val(orderStatus);
        $("#search").click();
    }

    $(".chosen-select").chosen({
        allow_single_deselect: true  //是否允许取消选择
        , disable_search: false,   //设置下拉多选框可见
        placeholder_text_multiple: "",
        width: '200px',
        height: '34px'
    });

</script>
</body>
</html>
